package com.douwong.student.utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Administrator on 2016/4/8 0008.
 * 时间的工具类
 */
public class TimeUtils {
    public static final String FORMAT_TYPE_TOTAL = "yyyy-MM-dd' 'HH:mm:ss";
    public static final String FORMAT_TYPE_MONTH_DAY = "MM-dd";
    /**
     * 获取时间，格式为 yyyy-MM-dd' 'HH:mm:ss
     * @return
     */
    public static String getTime( ) {
        DateFormat formatter = new SimpleDateFormat(FORMAT_TYPE_TOTAL);
        Date date = new Date(System.currentTimeMillis());
        String dateStr = formatter.format(date);
        return dateStr;
    }
}
